<template>
    <div class="list3">
        <!-- 头部 -->
        <!-- <div class="header">
            <x-icon type="ios-arrow-left" size="" class="icon-white" @click="$router.go(-1)"></x-icon>选择被检查单位
        </div> -->
        <!-- 内容部分 -->
        <div class="list3_main">
            <noData v-if="listArr == 0"></noData>
            <div class="list3Box">
                <group>
                    <radio :options="listArr" @on-change="change" v-model="radios"></radio>
                </group>
            </div>
        </div>
        <!-- <myMenu @clickBack="back"></myMenu> -->
    </div>
</template>
<script>
import { Radio, Group } from 'vux'
// import myMenu from '@/commonComponents/menu'
export default {
  components: {
    Radio,
    Group,
    // myMenu
  },
  data (){
      return {
        radios:'',
        listArr:[],
        param:{
            allowPaging:true,
            business:'GetCheckType',
            data:'615123137',
            pageIndex:0,
            pageSize:10000,
            tokenId:'D0853C0CE5A6A478F5C613B840394FC3',
            userId:'615123137'
        },
        name3:'',
        id:''
      }
  },
  mounted(){
    var token =JSON.parse(window.localStorage.getItem('userInfo'))
    this.param.userId=token.userid
    this.dataArr()
    this.radios=window.sessionStorage.getItem('name3')
  },
  methods: { 
      back(){
          
      },
    change (value, label) {
      console.log('change:', value, label)
      if (value){ 
        window.sessionStorage.setItem('name3',value)
      }
      if (this.radios!=value){
        this.$router.go(-1)
      }
    },
    dataArr(){
      this.$axiosAjax.getConfigJson(this.param).then((res)=>{
            if (res.status){
                var arr =res.data.data
                var array =[]
                for(var k in arr){
                    array.push(arr[k].checkTypeName)
                }
                this.listArr=array
            }
         }
      )
    },
  }
}

</script>
<style lang="less" scope>
.list3{
    width: 100%;
    height: 100%;
    .header{
        width: 100%;
        height: 40px;
        line-height: 40px;
        text-align: center;
        position: relative;
        font-size: 18px;
        background: #2269ff;
        color: #fff;
        .vux-x-icon{
            fill:cornsilk;
            position: absolute;
            left: 0;
            top: 5px;
            width: 30px;
            height: 30px;
        }
    }
    .list3_main{
        height: 603px;
        width: 100%;
        background-color: #ebeef2;
        .list3Box{
            width: 100%;
            height: 603px;
            background-color: #fff;
            ul{
                padding: 0 10px;
                li{
                    height: 60px;
                    line-height: 60px;
                    font-size: 20px;
                    border-bottom: 1px solid #999;

                }
            }
        }
    }
    .weui-cell:before{
        left: 0;
    }
}
</style>
